Skip to content

create-skill: quote argument-hint to keep it a YAML string#98

Open
thejesh23 wants to merge 1 commit into
elastic:mainfrom
thejesh23:fix/copilot-cli-1.0.65-argument-hint-string
Open

create-skill: quote argument-hint to keep it a YAML string#98
thejesh23 wants to merge 1 commit into
elastic:mainfrom
thejesh23:fix/copilot-cli-1.0.65-argument-hint-string

Conversation

@thejesh23

@thejesh23 thejesh23 commented Jul 3, 2026

Copy link
Copy Markdown

Summary

.claude/skills/create-skill/SKILL.md has:

argument-hint: [skill-name (optional)]

Copilot CLI 1.0.65 tightened SKILL.md frontmatter parsing and now requires argument-hint to be a string. YAML parses the unquoted [...] value as a flow sequence (a list), which breaks skill loading under the new release.

Fix: wrap the value in double quotes so it parses as a plain string.

-argument-hint: [skill-name (optional)]
+argument-hint: "[skill-name (optional)]"

This is also latent on Claude Code, tracked in anthropics/claude-code#22161.

YAML rule

Any argument-hint value whose first non-whitespace character is [ must be quoted, otherwise YAML treats it as a sequence. Two safe forms:

  • argument-hint: "[foo]" — string containing brackets
  • argument-hint: "foo" — plain string (drop the brackets entirely)

Scope of changes in this repo

I scanned every SKILL.md in the tree. Only one file has the bug:

  • .claude/skills/create-skill/SKILL.md

All other SKILL.md files use angle-bracket placeholders (<file-or-directory>, etc.) or already-quoted strings, which are safe.

Note: README.md and CONTRIBUTING.md show argument-hint: [args] and argument-hint: <args> as documentation examples of the frontmatter schema, not as live frontmatter that gets parsed. I left the docs alone in this PR to keep the change minimal, but happy to follow up with a docs tweak that recommends the quoted form if you'd like.

Test plan

  • Confirmed python3 -c "import yaml; yaml.safe_load(open('.claude/skills/create-skill/SKILL.md').read().split('---')[1])" returns argument-hint as a Python str, not a list, after the change.
  • Diff is a single-character-scope change (adds two \" quotes) — no behavior change beyond frontmatter typing.
  • CI (validate-skills.yml) passes on the PR.

Copilot CLI 1.0.65 requires the SKILL.md `argument-hint` frontmatter
field to be a string. An unquoted `[skill-name (optional)]` value is
parsed by YAML as a flow sequence, which breaks skill loading in the
new release.

Wrap the value in double quotes so it parses as a plain string, matching
the string form used by the other SKILL.md files in this repo.
@cla-checker-service

cla-checker-service Bot commented Jul 3, 2026

Copy link
Copy Markdown

💚 CLA has been signed

@thejesh23

Copy link
Copy Markdown
Author

Tracking issue: #99 — captures the bug diagnosis and reproducer separately for anyone searching the repo who lands there before this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant